frameclock: Run paint idle from flush idle
authorBenjamin Otte <otte@redhat.com>
Sun, 10 Jul 2022 19:15:22 +0000 (21:15 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 10 Jul 2022 19:33:32 +0000 (21:33 +0200)
commit988e20cd53c08cf69aeb43f40f63c47ab218ffd5
tree66acd6287491cbdc0ecf1d3befba37cad2358599
parent7536513ef82aa52d00d5fa90492239d0727bf942
frameclock: Run paint idle from flush idle

Don't return to the main loop, instead force a run of the paint idle.
The paint idle will know to skip all the phases that aren't requested.

This is critically important becuase gdksurface.c assumes the
FLUSH_EVENTS and RESUME_EVENTS phases are matched, and we cannot
guarantee that if we return to the main loop and let various reentrant
code change the frame clock state.

This would lead to bugs with events being paused and never unpaused
again or even crashes.

Fixes #4941
gdk/gdkframeclockidle.c